﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace MvcShop.Models
{
    [MetadataType(typeof(CategoryMetadata))]
    public partial class Category
    {
    }

    public class CategoryMetadata
    {
        [Required(ErrorMessage = "类别名称必填")]
        [StringLength(50,ErrorMessage="类别名称的长度不能超过50个字符.")]
        public string CategoryName { get; set; }
    }
}
